home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Examples
/
More Examples
/
Using MIDI tempo maps
< prev
next >
Wrap
Text File
|
1998-10-26
|
1KB
|
53 lines
; This demo shows how to use MIDI event tempos
(def-symbol
piano1 '(a b c d e f g h i j k l m n)
piano2 (reverse (symbol-of piano1))
)
(def-length
piano1 '((1/16) (1/8t))
piano2 '((1/16) (1/8t))
)
(def-duration
piano1 '(1/2 1/4 1/8)
piano2 '(1/4 1/8 1/2)
)
(def-tonality
piano1 (activate-tonality (pentamajor c 4) (pentamajor d# 4))
piano2 (activate-tonality (pentamajor c 5) (pentamajor d# 5))
)
; To make MIDI tempos write first the points of tempo
; changes. This is done within def-zone:
(def-zone
tempo '(1/1 1/1 1/1 1/1 1/1 1/1)
piano1 '(2/1 2/1 1/1 1/1)
piano2 '(2/1 2/1 1/1 1/1)
)
; Next you have to write a default tempo pattern. Tempo pattern can
; have less, equal or more elements than there are tempo change
; points. If there are less, then this pattern is repeated for all
; tempo changes. All instruments will use this tempo.
(def-tempo '(120 140 200 60))
; See the use of def-signature.
(def-channel
piano1 1
piano2 2
)
(midiport :printer)
(compile-instrument-p "ccl;output:" "tempoevents"
piano1
piano2
)